package com.qf.controller;

import com.github.pagehelper.PageInfo;
import com.qf.bean.Student2;
import com.qf.service.Student2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 2019/12/6
 * Administrator
 * springboot1204
 * 面向对象面向君  不负代码不负卿
 */
@RestController
public class Student2Controller {

    @Autowired
    private Student2Service student2Service;

    @RequestMapping("/getstudent2")
    public PageInfo<Student2> find(@RequestParam(defaultValue = "1") int index){
        return student2Service.findstudent2(index,2);
    }

    @RequestMapping("/getstudent2byid")
    public List<Student2> find(int[]  index){
        return student2Service.findstudentsbyIds(index);
    }
}
